package com.example.chat.chat.service.impl;

import com.example.chat.chat.dao.ChatDAO;
import com.example.chat.chat.pojo.dto.ChatDTO;
import com.example.chat.chat.pojo.entity.ChatEntity;
import com.example.chat.chat.service.ChatService;
import com.example.chat.common.utils.ConvertUtils;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

@Service
public class ChatServiceImpl implements ChatService {
    @Resource
    ChatDAO chatDAO;

    @Override
    public void save(ChatDTO chatDTO) {
        chatDAO.insert(ConvertUtils.of(chatDTO, ChatEntity.class));
    }
}
